home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
qlib205.zip
/
QLIB.ZIP
/
TXT
/
CALLP.TXT
< prev
next >
Wrap
Text File
|
1996-11-01
|
2KB
|
48 lines
callp
-----
There are some things you must understand about callp:
As you should know 'callp' is a macro I made to replace INVOKE and you
may freely use it (I recommend it over INVOKE greatly), it's in qlib.inc
(C programmers should not be concerned with this)
You should just know how it works so you can avoid some things:
Features/advantages/disadvantages :
- all args are zero extended to DWORDs (regardless of what the PROC wants)
(hey, it's just a macro)
(it trashing eax sometimes but you shall be warned if you try and use
eax if it's been trashed)
- QWORDs are pushed properly now
- FWORDs are zero extended to QWORDs (does NOT trash eax)
- no augment matching is performed at all (it's just a simple macro)
- if a constant is given it is pushed as a DWORD - this is the only
real problem if a FWORD or QWORD is expected by the proc then it will
not get it properly (and all other args after that)
- knows that segment registers are 32bits (unlike INVOKE which messes
up the stack and crashes your programs)
- properly extends args (INVOKE does not always properly extend them -
ie : Proc expects DWORD and you pass a WORD, Masm should push a word
0 then the WORD, but instead it pushes DWORD 0 then the WORD (stack
messed up and program crashes))
So don't use INVOKE (it sux) and use callp. You should never have any more
problems again... (NOTE: INVOKE only bombs like this in 32bit segments,
as far as I know in 16bit ones it works ok) (but who works in 16bit modes
anymore?)
If you don't want to use callp and want the speed that INVOKE gives
keep harasing MS until they fix INVOKE! (renaming it to CALL would be nice too)
call 1-905-568-3503 (Toronto)
or 1-800-759-5474 (Developers Network?)
or 1-800-936-4300 (Automation help) (press 5 for MASM V6.1 ??)
(gee isn't V6.11 out yet !!)
Please report any problems/bugs to me (concerning callp).
mailto:subdeath@globalserve.net
http://www.globalserve.net/~subdeath